import java.util.ArrayList;
import java.util.List;

public class Test03 {
    public static void main(String[] args) {
        /*
        需求说明：程序启动后可以接收三个学员信息，然后可以打印所有学员信息，并找出身高最高的学员，并打印他们的详细信息
  学号	姓名    性别	    年龄	    身高
it001	黄渤	    男		20		1.72
it002	孙红雷	男		22		1.78
it003	章子怡	女		18		1.64
         */
        List<Person> list=new ArrayList<Person>();
        list.add(new Person("it001","黄渤","男",20,1.72));
        list.add(new Person("it002","孙红雷","男",22,1.78));
        list.add(new Person("it003","章子怡","女",18,1.64));
        Double temp=list.get(0).getHeight();
        for(int i=0;i<list.size();i++){
            if(temp<list.get(i).getHeight()){
                temp=list.get(i).getHeight();
            }
        }
        for(int i=0;i<list.size();i++){
            if(temp==list.get(i).getHeight()){
                System.out.println(list.get(i));
            }
        }
    }
}
class Person{
    private String id;
    private String name;
    private String Sex;
    private Integer age;
    private Double height;

    public Person() {
    }

    public Person(String id, String name, String sex, Integer age, Double height) {
        this.id = id;
        this.name = name;
        Sex = sex;
        this.age = age;
        this.height = height;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return Sex;
    }

    public void setSex(String sex) {
        Sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", Sex='" + Sex + '\'' +
                ", age=" + age +
                ", height=" + height +
                '}';
    }
}
